package com.jniproject;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;

/**
 *
 *  //JNI返回Java对象(转)  https://www.cnblogs.com/yongdaimi/p/14023154.html
 */
public class TestRegistNativeMethodActivity extends AppCompatActivity {
    private static final String TAG = "TestRegistNativeMethodA";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_regist_native_method);
    }

    public void method1(View view) {
        Log.i(TAG, "method1: ");
//        long l = newBookJni();
//        Log.i(TAG, "method1: result: "+l);
    }

    //JNI返回Java对象(转)  https://www.cnblogs.com/yongdaimi/p/14023154.html
    public void method2(View view) {
        Log.i(TAG, "bookJniToJava: stat:");
//        BookJava book = getBook();
//        Log.i(TAG, "bookJniToJava: result: "+book.toString());
    }

    public void method3(View view) {
//        long l = newBookJni1(new BookJava());
//        Log.i(TAG, "inputObjGetLong: "+l);
    }




    static {
        System.loadLibrary("test-regist-native-method");
    }

//    //descriptor: (Lcom/jniproject/BookJava;)J
//    public static native long newBookJni1(BookJava book);
//
//    //descriptor: ()J
//    public static native long newBookJni();
//
//    //descriptor: ()Lcom/jniproject/BookJava;
//    public static native BookJava getBook();
}